﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.InsuranceWarranty;

namespace ZBJF.Warranty.BLL
{
    public partial class AuditProjectFieldOptionService
    {
        /// <summary>
        /// 得到审核项的文本，以','分隔
        /// </summary>
        /// <param name="optionIDs"></param>
        /// <returns></returns>
        public string GetOptionsFieldNames(List<int> optionIDs)
        {
            var list=LoadEntities(o => optionIDs.Contains(o.ID));
            return list.Any()
                ? list.Select(o => o.OptionName).ToList().Aggregate(string.Empty, (c, d) => c + ',' + d).Trim(',')
                : "";
        }
    }
}
